package com.mydomain.debtbook;

import java.util.ArrayList;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.TabHost;

public class ListContactTabActivity extends TabActivity {

	private SimpleCursorAdapter cursorAdapter;
	private Cursor cursor;
	private Button submit;
	private Button back;
	private OnClickListener myClickListener;
	private ListView listView;
	private ArrayList<String> contactList;

	public static final int SINGLE_REQUEST = 0;
	public static final int GROUP_REQUEST = 1;

	private TabHost.TabSpec spec1;
	private TabHost.TabSpec spec2;
	private Resources res;

	// private TabHost tabHost;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// setContentView(R.layout.main);
		TabHost.TabSpec spec;
		Resources res = getResources(); // Resource object to get Drawables
		TabHost tabHost = getTabHost(); // The activity TabHost

		tabHost.setup(getLocalActivityManager());
		Intent intent; // Reusable Intent for each tab

		intent = new Intent().setClass(getBaseContext(),
				ListContactActivity.class);
		spec = tabHost
				.newTabSpec("Contacts")
				.setIndicator("Contacts",
						res.getDrawable(R.drawable.ic_tab_profile))
				.setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(getBaseContext(),
				ListGroupActivityGroup.class);
		spec = tabHost
				.newTabSpec("Group")
				.setIndicator("Group", res.getDrawable(R.drawable.ic_tab_group))
				.setContent(intent);
		tabHost.addTab(spec);

		tabHost.setCurrentTab(0);

	}

}
